import java.util.Objects;

class Student {
    public String stuN="240115";

    public Student(String stuN) {
        this.stuN=stuN;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(stuN, student.stuN);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(stuN);
    }
}

public class Test {

    public static void main(String[] args) {
        Student student1=new Student("240115");
        HashBuck2<Student,Double> hashBuck2 = new HashBuck2<>();
        hashBuck2.put(student1,99.99);

        Student student2=new Student("240115");

        System.out.println(hashBuck2.get(student2));
    }

    public static void main2(String[] args) {
        Student student1=new Student("240115");
        Student student2=new Student("240115");

        int hashcode1=student1.hashCode();
        int hashcode2=student2.hashCode();
        System.out.println(hashcode1);
        System.out.println(hashcode2);
    }
    public static void main1(String[] args) {
        HashBuck hb=new HashBuck();
        hb.put(1,99);
        hb.put(2,88);
        hb.put(3,77);
        hb.put(4,28);
        hb.put(5,20);
        hb.put(6,38);
        hb.put(7,50);
        hb.put(17,23);
        hb.put(27,45);

        System.out.println(hb.get(14));
    }
}
